#include <iostream>
using namespace std;
int main() {
    int n;
    int cnt = 0;
    while(scanf("%d", &n) == 1){
        if(cnt++) printf("\n");
        printf("2 %d %d\n", n, n);
        for (int r = 0; r < n; ++r) {
            char ch = r >25? 'A'+r-26 : 'a'+r;
            for (int c = 0; c < n; ++c) {
                printf("%c", ch);
            }
            printf("\n");
        }
        printf("\n");
        for (int r = 0; r < n; ++r) {
            for (int c = 0; c < n; ++c) {
                char ch = c >25? 'A'+c-26 : 'a'+c;
                printf("%c", ch);
            }
            printf("\n");
        }
    }
    return 0;
}
